package com.imooc.spring.ioc.service;


import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Service
public class User1Service {

    @PostConstruct //XML中bean init-method完全相同
    public void init1() {
        System.out.println("-----123333");
    }


    public void say() {
        System.out.println(1234);
    }

    @PreDestroy
    public void destory() {
        System.out.println("123...");
    }

}
